package com.zy.sing;

/**
 * @Author Gong
 * @Description
 * @dATE 2021/11/22 14:43
 **/
public class Single {
    private volatile static Single singleton;
    private Single (){}
    public static Single getSingleton() {
        if (singleton == null) {
            synchronized (Single.class) {
                if (singleton == null) {
                    singleton = new Single();
                }
            }
        }
        return singleton;
    }

}
